package com.jzo2o.customer.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jzo2o.api.customer.dto.response.AddressBookResDTO;
import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.domain.AddressBook;
import com.jzo2o.customer.model.dto.request.AddressBookPageQueryReqDTO;
import com.jzo2o.customer.model.dto.request.AddressBookUpsertReqDTO;

import java.util.List;

/**
 * <p>
 * 地址薄 服务类
 * </p>
 *
 * @author itcast
 * @since 2023-07-06
 */
public interface IAddressBookService extends IService<AddressBook> {






    List<AddressBookResDTO> getByUserIdAndCity(Long userId, String city);


    void add(AddressBookUpsertReqDTO dto);

    PageResult<AddressBookResDTO> getpage(AddressBookPageQueryReqDTO dto);

    void updateById(Long id, AddressBookUpsertReqDTO dto);

    void setDefault(Long id, int flag);

    AddressBookResDTO getDefaultAddress();
}
